Skip to content

Conversation

corporateuser
Copy link

@corporateuser corporateuser commented Jul 31, 2025

@protocol annotation should support arrays like:

@protocol: [
  {
    kind: 'odata',
    path: '/sap/ace/SystemService'
  },
  {
    kind: 'rest',
    path: '/sap/ace/rest/SystemService'
  }
]

https://cap.cloud.sap/docs/node.js/cds-serve#protocol

@protocol annotation should support arrays like:
@protocol: [
  {
    kind: 'odata',
    path: '/sap/ace/SystemService'
  },
  {
    kind: 'rest',
    path: '/sap/ace/rest/SystemService'
  }
]
@@ -155,10 +155,20 @@ function _getProtocols(csdl, csn, odataVersion) {
protocols.push(service["@protocol"]);
} else if (Array.isArray(service["@protocol"])) {
service["@protocol"].forEach((protocol) => {
if (protocol === "rest" || protocol === "odata" || protocol === "odata-v4") {
protocols.push(protocol);
if(typeof protocol === "string"){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like odata-v4 got lost?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants